package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class CastOption implements UserDefinedTypeOption {

    private int beginIndex;
    private int endIndex;
    private CastToDistinct castToDistinct;
    private CastToSource castToSource;

    public CastOption(CastToDistinct castToDistinct, CastToSource castToSource) {
        this.beginIndex = castToDistinct != null ? castToDistinct.getBeginIndex() : castToSource.getBeginIndex();
        this.endIndex = castToSource != null ? castToSource.getEndIndex() : castToDistinct.getEndIndex();
        this.castToDistinct = castToDistinct;
        this.castToSource = castToSource;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public CastToDistinct getCastToDistinct() {
        return castToDistinct;
    }

    public CastToSource getCastToSource() {
        return castToSource;
    }

}
